/**
 *  关于配置相关api
 */
import {
	http
} from '@/api/config.js'

const config = {
	custom: {
		loadinHide: true
	}
}
/**
 * 查询个人总积分
 */
export const getTotalScore = () => {
	return http.get('/score/total', config)
}
/**
 * 查询个人每日任务
 */
export const getTask = () => {
	return http.get('/score/task')
}

/**
 * 签到
 */
export const checkIn = () => {
	return http.get('/score/checkIn')
}

/**
 * 分享获取积分
 */
export const getScoreByShare = () => {
	return http.get('/score/share', config).catch(() => {})
}

/**
 * 邀请好友登录
 */
export const getScoreByInvite = (fromUserId) => {
	return http.get('/score/invite/' + fromUserId, config).catch(() => {})
}

/**
 * 分页查询积分明细
 */
export const getHistoryList = (param) => {
	return http.post('/score/history', {
		...param
	})
}